<title>PostHog</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">

<!-- Favicons & OS-theme configurations -->
<link rel="apple-touch-icon" sizes="180x180" href="/static/icons/apple-touch-icon.png?v=2023-07-07">
<link rel="icon" type="image/png" sizes="32x32" href="/static/icons/favicon-32x32.png?v=2023-07-07">
<link rel="icon" type="image/png" sizes="16x16" href="/static/icons/favicon-16x16.png?v=2023-07-07">
{% if not debug %}
    <link rel="shortcut icon" href="/static/icons/favicon.ico?v=2023-07-07">
{% else %}
    <link rel="shortcut icon" href="/static/icons/favicon-dev.ico?v=2023-07-07">
{% endif %}
<link rel="mask-icon" href="/static/icons/safari-pinned-tab.svg?v=2023-07-07" color="#FF053C">
<link rel="manifest" href="/static/site.webmanifest?v=2023-07-07">
<meta name="apple-mobile-web-app-title" content="PostHog">
<meta name="application-name" content="PostHog">

<script src=https://unpkg.com/eventsource@2.0.2/example/eventsource-polyfill.js></script>

{% if not opt_out_capture and js_posthog_api_key %}
    <script>
        window.JS_POSTHOG_API_KEY = {{js_posthog_api_key | safe}};
        window.JS_POSTHOG_HOST = {{js_posthog_host | safe}};
        window.JS_POSTHOG_UI_HOST = {{js_posthog_ui_host | safe}};
        window.JS_POSTHOG_SELF_CAPTURE = {{self_capture | yesno:"true,false" }};
        window.POSTHOG_USER_IDENTITY_WITH_FLAGS = JSON.parse("{{ posthog_bootstrap | escapejs }}")
        window.IMPERSONATED_SESSION = {{is_impersonated_session | yesno:"true,false"}};
        window.POSTHOG_JS_UUID_VERSION = "{{posthog_js_uuid_version}}";
    </script>
{% endif %}
{% if sentry_dsn %}
    <script>
        window.SENTRY_DSN = '{{ sentry_dsn | escapejs }}';
    </script>
{% endif %}
{% if sentry_environment %}
    <script>
        window.SENTRY_ENVIRONMENT = '{{ sentry_environment | escapejs }}';
    </script>
{% endif %}
<script id='posthog-app-user-preload'>
    window.POSTHOG_APP_CONTEXT = JSON.parse("{{ posthog_app_context | escapejs }}");
    // Inject the expected location of JS bundle, use to allow the location of
    // he bundle to be set at runtime, e.g. for PostHog Cloud we serve the
    // frontent JS from a CDN
    window.JS_URL = "{{ js_url|default:"" }}";
    window.JS_CAPTURE_TIME_TO_SEE_DATA = {{js_capture_time_to_see_data | yesno:"true,false"}};
    window.JS_KEA_VERBOSE_LOGGING = {{js_kea_verbose_logging | yesno:"true,false"}};
</script>
